layui.use(['jquery', 'element', 'form'], function(){
	var $ = layui.jquery;
	var element = layui.element;
	var form = layui.form;
	
	form.verify({
		number: [/^(((-?[1-9]\d*)|0)(\.\d+)?)?$/, '只能填写数字'],
		integer: [/^((-?[1-9]\d*)|0)?$/, '只能填写整数'],
		english: [/^[a-zA-Z0-9 ]*$/, '只能填写英文或数字']
	});
	$(function() {
		// 当前菜单
		var currentMenu = $('#currentMenu').val();
		if (currentMenu) {
			var $currentMenu = $('.user-menu-' + currentMenu);
			$currentMenu.addClass('layui-this');
			$currentMenu.parents('.layui-nav-item').addClass('layui-nav-itemed');
		}
	});
});
